import {
  createApp
} from 'vue'
import {
  createPinia
} from 'pinia'
import App from './App.vue'
import router from './router'
import './assets/scss/index.scss'
import registerDirectives from './assets/js/tc';

// ------- import ElementPlus start ------
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// ------ end ------

const app = createApp(App)
registerDirectives(app)
app.use(createPinia())
app.use(router)


// 全局使用element-plus组件与图标
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')